package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class RegistrationMessage {
    /**
     * 职位聊天编号
     */
    private int rmId;
    /**
     * 用户报名表编号（外键）
     */
    private int ujrId;
    /**
     * 发布人（外键）
     */
    private int dispatchId;
    /**
     * 接收者（外键）
     */
    private int receiveId;
    /**
     * 发送的内容
     */
    private String content;
    /**
     * 发送的图片|音频|视频
     */
    private String image;
    /**
     * 消息的状态
     */
    private int status;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public RegistrationMessage() {}
    public RegistrationMessage(int rmId, int ujrId, int dispatchId, int receiveId, String content, String image, int status, Date createTime, int state) {
        this.rmId = rmId;
        this.ujrId = ujrId;
        this.dispatchId = dispatchId;
        this.receiveId = receiveId;
        this.content = content;
        this.image = image;
        this.status = status;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("rmId","rm_id");
        map.put("ujrId","ujr_id");
        map.put("dispatchId","dispatch_id");
        map.put("receiveId","receive_id");
        map.put("content","content");
        map.put("createdAt","created_at");
        map.put("image","image");
        map.put("status","status");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getRmId() {
        return rmId;
    }

    public void setRmId(int rmId) {
        this.rmId = rmId;
    }

    public int getUjrId() {
        return ujrId;
    }

    public void setUjrId(int ujrId) {
        this.ujrId = ujrId;
    }

    public int getDispatchId() {
        return dispatchId;
    }

    public void setDispatchId(int dispatchId) {
        this.dispatchId = dispatchId;
    }

    public int getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(int receiveId) {
        this.receiveId = receiveId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印报名交流信息表
     * @return
     */
    @Override
    public String toString() {
        return "RegistrationMessage{" +
                "rmId=" + rmId +
                ", ujrId=" + ujrId +
                ", dispatchId=" + dispatchId +
                ", receiveId=" + receiveId +
                ", content='" + content + '\'' +
                ", image='" + image + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
